package main

import "fmt"

func greeting(myChannel chan string) {
	// 在channel上发送值
	myChannel <- "this is a chan"
}

func main() {
	MyChannel := make(chan string)
	go greeting(MyChannel)
	// 在channel上接收值
	value := <-MyChannel
	fmt.Println(value)
}
